/*
** set_socket.c for  in /home/faye_m//tmp/zappy-2011/new_server/src/zappy-2011/new_server/src
** 
** Made by mouhamed faye
** Login   <faye_m@epitech.net>
** 
** Started on  Sun Jul 10 11:43:31 2011 mouhamed faye
** Last update Sun Jul 10 11:43:57 2011 mouhamed faye
*/
#include <sys/socket.h>
#include <unistd.h>
#include <stdlib.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include "types.h"
void    set_socket(T_env *e)
{
  if ((e->listener = socket(AF_INET, SOCK_STREAM, 0)) == -1)
    exit(1);
  setsockopt(e->listener, SOL_SOCKET, SO_REUSEADDR, &e->yes, sizeof(int));
}
